#include "userinfo.h"
#include "client_connet.h"
#include <QPushButton>
#include <QLabel>
#include <QString>
#include <QJsonObject>
UserInfo::UserInfo(QWidget *parent , QString selfname , QString selfid) : QWidget(parent) , selfname(selfname) , selfid(selfid)
{
    this->resize(800,300);

    QPushButton *self_tx = new QPushButton(this);
    self_tx->setText("头像");
    self_tx->setGeometry(50,50,200,200);

    QLabel *self_name = new QLabel(this);
    self_name->setText(selfname);
    self_name->setGeometry(300,50,200,100);

    QLabel *self_id = new QLabel(this);
    self_id->setText(selfid);
    self_id->setGeometry(300,150,200,100);

    QPushButton *self_close = new QPushButton(this);
    self_close->setText("退出");
    self_close->setGeometry(600,100,100,100);
    connect(self_close,&QPushButton::clicked,[=]()
    {
       //
       QJsonObject q_tu;
       q_tu["cmd"]=6;
       q_tu["loginid"]=selfid;
       Client_connet::Get_Connet()->set_obj(q_tu);
       Client_connet::Get_Connet()->SendServer();
    });
}
